<template>
<div class="content">
	<div style="height: 10px;"></div>
    <div v-for="item in list" @click="helpDetail(item)" style="display: flex;align-items: center;justify-content: space-between;margin-top: 10px;">
		<div>{{item.helpName}}</div>
		<div style="display: flex;align-items: center;">
		    <u-icon color="#000000" name="arrow-right"></u-icon>
		    <div style="width: 10px;"></div>
		</div>
	</div>
</div>
</template>
<script>
import { helpList } from '../api/api';
export default {
    data(){
        return {
		list:[]
        }
    },
    methods:{
		helpDetail(e){
			uni.setStorageSync('helpContent',e);
			uni.navigateTo({
				url:`/pagesDispatch/index/helpDetail`
			})
		}
    },
    onShow(){
        let role = uni.getStorageSync('userInfo').remark;
		let parentid;
        if(role=='处理厂司机'){
			parentid = '1';
		}else if(role=='养殖场账号'){
			parentid = '2';
		}else if(role=='调度员司机'){
			parentid = '3';
		}else if(role=='调度员'){
			parentid = '3';
		}
        helpList(parentid).then(res=>{
			console.log(res.data);
			this.list = res.data.rows;
		})
    }

}
</script>
<style lang="scss">
.content{
	width:90%;
	margin-left: 5%;
	font-size: 18px;
	font-weight: 500;
}
</style>